package com.revenant.driver.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.revenant.driver.R;
import com.revenant.driver.bean.AreaShowBean;
import com.revenant.driver.bean.Selectareabean;

/**
 * @ProjectName: Shipper
 * @Package: com.revenant.shipper.adapter
 * @ClassName: MineBigItemAdapter
 * @Description: java类作用描述
 * @Author: revenant
 * @CreateDate: 2019-12-30 14:18
 * @UpdateUser: 更新者
 * @UpdateDate: 2019-12-30 14:18
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class AreaSelectItemAdapter extends BaseQuickAdapter<Selectareabean.DataBean, BaseViewHolder> {
    public AreaSelectItemAdapter() {
        super(R.layout.item_area_recyvlerview);
    }

    @Override
    protected void convert(BaseViewHolder helper, Selectareabean.DataBean item) {
        if (item.getSelectcount() == 0) {
            helper.setText(R.id.area_item_text, item.getName());
            if (item.getSelect() == false) {
                helper.setTextColor(R.id.area_item_text, mContext.getColor(R.color.black));
                helper.setBackgroundColor(R.id.area_item_text, mContext.getColor(R.color.selectareabg));
            } else {
                helper.setTextColor(R.id.area_item_text, mContext.getColor(R.color.selectareacolor));
                helper.setBackgroundColor(R.id.area_item_text, mContext.getColor(R.color.white));
            }
        }


    }
}